package day12.xml;

import java.util.List;

public class StudentTest {
    public static void main(String[] args) {
        StudentDao studentDao = new StudentDaoImpl();
        List<Student> studentList = studentDao.queryAll();

        String name = "张三";
        String password = "123";

        for (Student student : studentList) {
            if (student.getName().equals(name) && student.getPassword().equals(password)){
                for (Student student1 : studentList) {
                    System.out.println(student1);
                }
            }
        }

    }

    public static void query(){
        StudentDao studentDao = new StudentDaoImpl();
        List<Student> studentList = studentDao.queryAll();
        for (Student student : studentList) {
            System.out.println(student);
        }
    }
}
